package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TNlRecordMapper;
import com.ruoyi.business.domain.TNlRecord;
import com.ruoyi.business.service.ITNlRecordService;

/**
 * 尿量记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-12
 */
@Service
public class TNlRecordServiceImpl implements ITNlRecordService 
{
    @Autowired
    private TNlRecordMapper tNlRecordMapper;

    /**
     * 查询尿量记录
     * 
     * @param id 尿量记录主键
     * @return 尿量记录
     */
    @Override
    public TNlRecord selectTNlRecordById(String id)
    {
        return tNlRecordMapper.selectTNlRecordById(id);
    }

    /**
     * 查询尿量记录列表
     * 
     * @param tNlRecord 尿量记录
     * @return 尿量记录
     */
    @Override
    public List<TNlRecord> selectTNlRecordList(TNlRecord tNlRecord)
    {
        return tNlRecordMapper.selectTNlRecordList(tNlRecord);
    }

    /**
     * 新增尿量记录
     * 
     * @param tNlRecord 尿量记录
     * @return 结果
     */
    @Override
    public int insertTNlRecord(TNlRecord tNlRecord)
    {
        tNlRecord.setCreateTime(DateUtils.getNowDate());
        return tNlRecordMapper.insertTNlRecord(tNlRecord);
    }

    /**
     * 修改尿量记录
     * 
     * @param tNlRecord 尿量记录
     * @return 结果
     */
    @Override
    public int updateTNlRecord(TNlRecord tNlRecord)
    {
        tNlRecord.setUpdateTime(DateUtils.getNowDate());
        return tNlRecordMapper.updateTNlRecord(tNlRecord);
    }

    /**
     * 批量删除尿量记录
     * 
     * @param ids 需要删除的尿量记录主键
     * @return 结果
     */
    @Override
    public int deleteTNlRecordByIds(String[] ids)
    {
        return tNlRecordMapper.deleteTNlRecordByIds(ids);
    }

    /**
     * 删除尿量记录信息
     * 
     * @param id 尿量记录主键
     * @return 结果
     */
    @Override
    public int deleteTNlRecordById(String id)
    {
        return tNlRecordMapper.deleteTNlRecordById(id);
    }
}
